Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

COMP: Update Main.cxx to explicitly include configure headers for used macros #53

Conversation

jcfr
Copy link
Collaborator

@jcfr jcfr commented Jul 13, 2023

This fixes a regression introduced in 451194ac6 (COMP: Remove obsolete version header includes) and apply a fix similar to 8c2143ee9 (COMP: Explicitly include version header where associated macros are used)

See https://discourse.slicer.org/t/custom-app-compile-error-slicer-main-project-version-full-undefined/30577

…d macros

This fixes a regression introduced in 451194ac6 (COMP: Remove obsolete
version header includes) and apply a fix similar to 8c2143ee9 (COMP: Explicitly
include version header where associated macros are used)

See https://discourse.slicer.org/t/custom-app-compile-error-slicer-main-project-version-full-undefined/30577

Co-authored-by: Csaba Pinter <pinter.csaba@gmail.com>
Co-authored-by: Kambiz Darabi <darabi@m-creations.com>
@@ -22,6 +22,8 @@
// Slicer includes
#include "qSlicerApplication.h"
#include "qSlicerApplicationHelper.h"
#include "vtkSlicerConfigure.h" // For Slicer_MAIN_PROJECT_APPLICATION_NAME
Copy link

@darabi darabi Jul 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not strictly necessary, as it is included transitively via

qSlicerApplication.h -> qSlicerCoreApplication.h -> vtkSlicerConfigure.h

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the review 🙏

While it is not strictly required, it is good practice to include headers for classes or macros directly used. It prevents issues if any of the files indirectly included are updated.

@jcfr jcfr merged commit a53f0c5 into KitwareMedical:main Jul 13, 2023
@jcfr jcfr deleted the explicitly-include-vtkSlicerVersionConfigure-header branch July 13, 2023 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants